// 引入api请求requestCategoryList
import { requestSearchList } from '@/api'
const state = {
  searchList: {}
}
const mutations = {
  // 设置数据
  setSearchList(state, value) {
    state.searchList = value
  }
}
const actions = {
  async getSearchList({ commit }, value) {
    const res = await requestSearchList(value)
    commit('setSearchList', res)
  }
}
const getters = {
  trademarkList(state) {
    return state.searchList.trademarkList
  },
  attrsList(state) {
    return state.searchList.attrsList
  },
  goodsList(state) {
    return state.searchList.goodsList
  },
}
// 暴漏出去
export default {
  // 命名空间打开
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}